<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Checks if given strings can be confused</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="class.spoofchecker.html">« Spoofchecker</a></li>
      <li style="float: right;"><a href="spoofchecker.construct.html">Spoofchecker::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.spoofchecker.html">Spoofchecker</a></li>
    <li>Checks if given strings can be confused</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="spoofchecker.areconfusable" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Spoofchecker::areConfusable</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.4.0, PHP 7, PHP 8, PECL intl &gt;= 2.0.0)</p><p class="refpurpose"><span class="refname">Spoofchecker::areConfusable</span> &mdash; <span class="dc-title">Checks if given strings can be confused</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-spoofchecker.areconfusable-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Spoofchecker::areConfusable</strong></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$string1</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$string2</code></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter reference">&$errorCode</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   Checks whether two given strings can easily be mistaken.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-spoofchecker.areconfusable-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>
<code class="parameter">string1</code></dt>

    <dd>

     <p class="para">
      First string to check.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">string2</code></dt>

    <dd>

     <p class="para">
      Second string to check.
     </p>
    </dd>

   
   
    <dt>
<code class="parameter">errorCode</code></dt>

    <dd>

     <p class="para">
      This variable is set by-reference to <span class="type">int</span> containing an error, if there
      was any.
     </p>
    </dd>

   
  </dl>

 </div>


 <div class="refsect1 returnvalues" id="refsect1-spoofchecker.areconfusable-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code>true</code></strong> if two given strings can be confused, <strong><code>false</code></strong> otherwise.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-spoofchecker.areconfusable-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2470">
    <p><strong>示例 #1 <span class="function"><strong>Spoofchecker::areConfusable()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$checker&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Spoofchecker</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">$checker</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">areConfusable</span><span style="color: #007700">(</span><span style="color: #DD0000">'google.com'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'goog1e.com'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;true<br />//&nbsp;Lower&nbsp;l&nbsp;can&nbsp;be&nbsp;confused&nbsp;with&nbsp;digit&nbsp;one<br /><br /></span><span style="color: #0000BB">$checker</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">areConfusable</span><span style="color: #007700">(</span><span style="color: #DD0000">'google.com'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'g00g1e.com'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;false<br />//&nbsp;Zero&nbsp;(0)&nbsp;cannot&nbsp;be&nbsp;easily&nbsp;confused&nbsp;with&nbsp;"o"&nbsp;letter</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

</div></div></div></body></html>